package com.quanxiaoha.weblog.web.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTasks {

    @Autowired
    private ScheduleConfig scheduleConfig;

    @Scheduled(cron = "#{@scheduleConfig.cron}")
    public void reportCurrentTime() {
        System.out.println("定时任务执行时间: " + new java.util.Date());
    }
}

